package com.eshore.norm.pattern.decorator;

/**
 * 配料-鸡蛋类 ConcreteDecorator( 具体的装饰者)
 *
 * @author: v-chenjl62
 * @date: 2024/2/5 15:01
 */
public class Egg extends Garnish{

    public Egg(FastFood fastFood) {
        super(fastFood, 1, "鸡蛋");
    }

    @Override
    public float cost() {
        //计算价格
        return getPrice() + getFastFood().cost();
    }

    @Override
    public String getDesc(){
        return super.getDesc()+getFastFood().getDesc();

    }

}
